package cn.xfdzx.android.apps.shop.model;


import cn.xfdzx.android.apps.shop.bean.GoodsLimitBean;
import cn.xfdzx.android.apps.shop.bean.GoodsMiaoSBean;
import cn.xfdzx.android.apps.shop.contract.GoodsLimitContract;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;
import io.reactivex.Flowable;

/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */
public class GoodsLimitModel implements GoodsLimitContract.Model {

    @Override
    public Flowable<GoodsLimitBean> getGoodsLimitList(String limit, int page) {
        return RetrofitClient.getInstance().getApi().getGoodsLimit(page,limit);
    }

    @Override
    public Flowable<GoodsLimitBean> getGoodsLimitListHighSales() {
        return RetrofitClient.getInstance().getApi().getGoodsLimitHighSales();
    }

    @Override
    public Flowable<GoodsMiaoSBean> getGoodsMiaoShaList(String limit, int page) {
        return RetrofitClient.getInstance().getApi().getGoodsMiaoShaList(page,limit);
    }

    @Override
    public Flowable<GoodsMiaoSBean> getGoodsStock(String good_id) {
        return RetrofitClient.getInstance().getApi().getGoodsStock(good_id);
    }

    @Override
    public Flowable<GoodsMiaoSBean> getLimitGoodsStock(String good_id) {
        return RetrofitClient.getInstance().getApi().getGoodsStockLimit(good_id);
    }
}
